QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

DEFINES += __OS_Linux__

SOURCES += \
    ./QT_src/main.cpp \
    ./QT_src/mainwindow.cpp \
    QT_src/ijkplayerImp.cpp

SOURCES += \
    ./util/dump_pts.c

HEADERS += \
    ./util/dump_pts.h

HEADERS += \
    QT_src/ijkplayerImp.h \
    QT_src/mainwindow.h


FORMS += \
    QT_src/mainwindow.ui

SOURCES += \
    ./ijkplayer/ijkplayer.c \
    ./ijkplayer/ff_ffpipeline.c \
    ./ijkplayer/ff_cmdutils.c  \
    ./ijkplayer/ff_ffpipenode.c    \
    ./ijkplayer/ff_ffplay.c        \
    ./ijkplayer/ijkmeta.c  \
    ./ijkplayer/ijkavformat/allformats.c        \
    ./ijkplayer/ijkavformat/cJSON.c        \
    ./ijkplayer/ijkavformat/ijkasync.c        \
    ./ijkplayer/ijkavformat/ijkioapplication.c        \
    ./ijkplayer/ijkavformat/ijkio.c        \
    ./ijkplayer/ijkavformat/ijkiocache.c        \
    ./ijkplayer/ijkavformat/ijkioffio.c        \
    ./ijkplayer/ijkavformat/ijkiomanager.c        \
    ./ijkplayer/ijkavformat/ijkioprotocol.c        \
    ./ijkplayer/ijkavformat/ijkiourlhook.c        \
    ./ijkplayer/ijkavformat/ijklas.c        \
    ./ijkplayer/ijkavformat/ijklivehook.c        \
    ./ijkplayer/ijkavformat/ijklongurl.c        \
    ./ijkplayer/ijkavformat/ijkmediadatasource.c        \
    ./ijkplayer/ijkavformat/ijksegment.c        \
    ./ijkplayer/ijkavformat/ijkurlhook.c        \
    ./ijkplayer/ijkavutil/ijkdict.c        \
    ./ijkplayer/ijkavutil/ijkfifo.c        \
    ./ijkplayer/ijkavutil/ijkstl.cpp        \
    ./ijkplayer/ijkavutil/ijkthreadpool.c        \
    ./ijkplayer/ijkavutil/ijktree.c        \
    ./ijkplayer/ijkavutil/ijkutils.c        \
    ./ijkplayer/pipeline/ffpipeline_ffplay.c        \
    ./ijkplayer/pipeline/ffpipenode_ffplay_vdec.c        \

SOURCES += \
    ./ijksdl/ijksdl_aout.c        \
    ./ijksdl/ijksdl_timer.c        \
    ./ijksdl/ijksdl_vout.c        \
    ./ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c        \
    ./ijksdl/ffmpeg/abi_all/image_convert.c        \
    ./ijksdl/linux/ijksdl_aout_SDL_audio.c        \
    ./ijksdl/linux/ijksdl_vout_SDL_surface.c        \
    ./ijksdl/linux/ijksdl_vout_SDL_window.c        \

INCLUDEPATH += $$PWD/ijkplayer/
INCLUDEPATH += $$PWD/ijksdl/
INCLUDEPATH += $$PWD/libffmpeg/
INCLUDEPATH += /usr/include/SDL2

LIBS += -lpthread
LIBS += -L$$PWD/lib/ -lSDL2 -lSDL2main
LIBS += -lm -ldl -lrt -lbsd \
        -lX11 -lXext -lasound  -lpulse -lXcursor  -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lwayland-egl -lwayland-client \
        -lwayland-cursor -lxkbcommon
LIBS += -L$$PWD/libffmpeg/install/lib  -lavutil -lavformat -lswresample -lavcodec -lswscale -lavdevice -lavfilter  -lavdevice


# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
